package gao.xiaolei.dto;

import gao.xiaolei.entity.TestStep;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class TestDesignOutDto {//用于给测试计划菜单列表和测试计划详情查看的外输Dto

    private String id;//测试计划Id

    private String title;//测试计划标题

    private String author;// 测试计划编写者昵称

    private String authorId;//测试计划编写者Id

    private String describe;//测试计划描述或者主题文件夹描述

    private String status;// 测试计划的状态

    private Integer priority;// 测试计划的优先级

    private Integer childrenCount;//该节点的儿子数量

    private Integer leaf;//是否是叶子节点

    private String parentId;//父节点Id

    private LocalDateTime createDate;// 该测试计划的创建的日期

    private LocalDateTime updateDate;// 该测试计划更新的日期

    private List<TestStep> step;//测试步骤Id

    private List<TestRequirementDesignCoverDto> testReq;//关联的测试需求

    private Integer grade;//测试计划的分数

    public TestDesignOutDto(String title,String author, String authorId, String describe,LocalDateTime createDate, LocalDateTime updateDate,Integer grade) {
        this.title=title;
        this.author = author;
        this.authorId = authorId;
        this.describe = describe;
        this.createDate = createDate;
        this.updateDate = updateDate;
        this.grade=grade;
    }

    public TestDesignOutDto(String id, String title, String author,String authorId, String describe, String status, Integer priority, LocalDateTime createDate, LocalDateTime updateDate, List<TestStep> step, List<TestRequirementDesignCoverDto> testReq) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.authorId = authorId;
        this.describe = describe;
        this.status = status;
        this.priority = priority;
        this.createDate = createDate;
        this.updateDate = updateDate;
        this.step = step;
        this.testReq = testReq;
    }

    public TestDesignOutDto(String id, String title,int leaf ,String author,String authorId, String describe, String status, Integer priority, LocalDateTime createDate, LocalDateTime updateDate, List<TestStep> step, List<TestRequirementDesignCoverDto> testReq,Integer grade) {
        this.id = id;
        this.leaf=leaf;
        this.title = title;
        this.author = author;
        this.authorId = authorId;
        this.describe = describe;
        this.status = status;
        this.priority = priority;
        this.createDate = createDate;
        this.updateDate = updateDate;
        this.step = step;
        this.testReq = testReq;
        this.grade=grade;
    }
}
